<!--
 * @Description: 
 * @Version: 2.0
 * @Autor: wsh
 * @Date: 2023-06-20 18:20:38
 * @LastEditors: upholdjx 1373577124@qq.com
 * @LastEditTime: 2023-06-28 14:37:49
-->
<!-- 老人打卡管理 -->
<template>
  
    <aplid-base-crud 
    ref="crud" 
    class="w-100" 
    v-bind="{ ...theConfig, ...$attrs }" 
    :paramsObj="{ personType: 1, code: 3024,isWithAuth:props.isWithAuth,idCard:props.idCard }"
     >
    </aplid-base-crud>

</template>

<script setup lang="ts">
import { baseConfig } from './config'
import { editConfig } from '@/views/datacenter/comprehensiveQueries/utils/index'
import { cloneDeep } from 'lodash-es'
type Props = {
  isWithAuth?:any,
  isComprehensiveQueries?:boolean,
  newDetailEmployeeConfig?:Object,
  idCard?:string|undefined
}
let props = withDefaults(defineProps<Props>(),{
  isWithAuth:undefined,
  isComprehensiveQueries:false,
  idCard:undefined
})
let theConfig :any= ref({})

if(baseConfig){
  let defaultConfig = {}
  if(props.newDetailEmployeeConfig){
    defaultConfig = cloneDeep(props.newDetailEmployeeConfig)
  }else{
    defaultConfig = cloneDeep(baseConfig)
  }
  
  if(props.isComprehensiveQueries){
    theConfig.value = editConfig(defaultConfig)
  }else{
    theConfig.value = baseConfig
  }
  
}
</script>

<style scoped></style>